]> dgit.raspbian.org Git - gnome-shell.git/commit
signalTracker: Explicitly register destroyable types
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 5 Mar 2022 23:30:16 +0000 (00:30 +0100)
committerMarge Bot <marge-bot@gnome.org>
Sun, 6 Mar 2022 00:10:03 +0000 (00:10 +0000)
commitfc4f9f61fa6ffc1bf284339bb387a0ab0fe98cea
tree1c49fc7016e8c523406721918cf75d84ad3e650c
parentba23279f1fd3820fb81570b1b4a03048e5a7a3bc
signalTracker: Explicitly register destroyable types

We currently assume that any '::destroy' signal on a GObject type
has the semantics of the ClutterActor/GtkWidget signal, and should
therefore result in all signals being disconnected.

But we already have a case where the assumption doesn't hold: ShellWM
uses '::destroy' for the closing animation of windows, and the ShellWM
object itself remains very valid after the emission.

So rather than making assumptions about '::destroy', check objects
against a list of destroyable types that are explicitly registered
as such.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2226>
js/misc/signalTracker.js
js/ui/environment.js
js/ui/messageTray.js
tests/unit/signalTracker.js